import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import set_node_cls from "@dfeidao/atom-web/ui/set-node-cls";
import set_nodes_cls from "@dfeidao/atom-web/ui/set-nodes-cls";
import set from '@dfeidao/atom-web/local/set';

export default async function a005(fd: IFeidaoAiBrowserComponent, e: Event) {
	// todo
	const n = e.currentTarget as HTMLDivElement;


	const nodes = fd.data.node.querySelectorAll('[data-id="tbrow"]');
	const nds = Array.from(nodes) as HTMLElement[];
	set_nodes_cls(nds, 'bg-c', false);//选中变色

	set_node_cls(n, 'bg-c', true);//取消变色

	const d = n.getAttribute('data-v');
	const data = JSON.parse(d);
	set(fd, 'data', data);

}
